LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_signed.all;

ENTITY ulaDecoder IS
PORT (  Instr				: IN	STD_LOGIC_VECTOR(3 DOWNTO 0);
		Op					: OUT 	STD_LOGIC_VECTOR(1 DOWNTO 0));
END ulaDecoder;

ARCHITECTURE behavior OF ulaDecoder IS
BEGIN
	-- "0011", "1101" 	- AND 	- "00"
	-- "0100" 			- OR	- "01"	
	-- "0001", "1011" 	- ADD 	- "10"
	-- "0010", "1100" 	- SUB 	- "11"
	WITH Instr SELECT 
		Op	<=	"00" 	WHEN "0011", 	"00" WHEN "1101",
				"01"  	WHEN "0100",
				"10"	WHEN "0001", 	"10" WHEN "1011",
				"11"  	WHEN "0010", 	"11" WHEN "1100",
				"00"  	WHEN OTHERS;
END behavior;